Skip to content

fix: Scope plan storage AWS credentials to prevent Atmos auth interference#93

Merged
Dan Miller (milldr) merged 1 commit into
mainfrom
fix/clear-aws-credentials-before-atmos
Dec 12, 2025
Merged

fix: Scope plan storage AWS credentials to prevent Atmos auth interference#93
Dan Miller (milldr) merged 1 commit into
mainfrom
fix/clear-aws-credentials-before-atmos

Conversation

@milldr

Copy link
Copy Markdown
Member

What

Use output-credentials: true mode for plan storage credential configuration and pass credentials explicitly via step-level env: vars to the plan storage steps.

Why

When using Atmos auth for Terraform operations (instead of the terraform-apply-role setting), the AWS credentials configured for plan storage (S3/DynamoDB access) were persisting in environment variables and taking precedence over Atmos' authentication mechanism.

This caused authentication failures when:

  1. terraform-apply-role was not configured in gitops settings
  2. Atmos auth was expected to handle role assumption for the target account
  3. Plan storage credentials remained in AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN

Changes

  • Add output-credentials: true to plan storage credential configuration step
  • Add step id plan-storage-credentials for referencing credential outputs
  • Pass AWS credentials explicitly via env: to "Retrieve Plan" and "Retrieve Lockfile" steps
  • Rename second credential configuration step to "Configure Apply AWS Credentials" for clarity

@milldr Dan Miller (milldr) force-pushed the fix/clear-aws-credentials-before-atmos branch from e08101f to 8bafd3f Compare December 4, 2025 22:18
Comment thread action.yml
@milldr Dan Miller (milldr) added the minor New features that do not break anything label Dec 12, 2025
@goruha Igor Rodionov (goruha) added major Breaking changes (or first stable release) and removed minor New features that do not break anything labels Dec 12, 2025
@milldr Dan Miller (milldr) merged commit 9e7c58c into main Dec 12, 2025
19 of 23 checks passed
@milldr Dan Miller (milldr) deleted the fix/clear-aws-credentials-before-atmos branch December 12, 2025 17:14
@goruha Igor Rodionov (goruha) restored the fix/clear-aws-credentials-before-atmos branch December 18, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

major Breaking changes (or first stable release)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants